import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TestBRR {
    public static void main(String[] args) throws IOException {
        char c='a';
        BufferedReader bbread = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Enter 'q' Exit !");
        /*do {
            c=(char)bbread.read();
            System.out.print(c);
        }while(c!='q');//判断流中的单个字符溢出*/
//========================换成while写法========================//
        while(c!='q'){
            c=(char)bbread.read();//这里读到q就会print的
            System.out.print(c);
        }
    }
}
